package todo;

import java.util.concurrent.TimeUnit;

public class TimeConverter {
	
	public static int convertToInt(long time){
		int seconds = (int) (time / 1000) % 60 ;
		int minutes = (int) ((time / (1000*60)) % 60);
		int hours   = (int) ((time / (1000*60*60)) % 24)/* + 2*/;
		minutes = minutes * 100;
		hours = hours * 10000;
		
		return seconds + minutes + hours;
	}
	
	public static long convertToLong(int hhmmss){
		long hours = hhmmss / 10000;
		long minutes = (hhmmss - hours* 10000)/100;
		long seconds = (hhmmss - hours*10000 - minutes*100);
		
		return (hours*60*60 + minutes * 60  + seconds) * 1000;
		
	}

}
